<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <!-- 驼峰式匹配 -->
    <script>
      var camelMatch = function (queries, pattern) {
        let patternArr = pattern.split('')
        let useRe = eval(`/^[a-z]*${patternArr.map(x => x + '[a-z]*').join('')}$/`)
        return queries.map(x => useRe.test(x))
      }
      console.log(camelMatch(['FooBar', 'FooBarTest', 'FootBall', 'FrameBuffer', 'ForceFeedBack'], 'FB'))
    </script>
  </body>
</html>
